<template>
	<view class="pageView">
		<u-navbar
			title="任务通知"
			:autoBack="true"
		>
		</u-navbar>
		<view style="margin-top: 180rpx;">
			<scroll-view scroll-y="true" style="height: 70vh;">
				<view
				  style="margin-top: 20rpx;padding: 24rpx 36rpx;background: #fff;"
					v-for="(item, index) in taskList"
					:key="index"
				>
					<view class="taskItemHead">
						<view class="taskItemHead-left">
							<image :src="imgUrl + 'images/tasks.png'" class="taskItemHead-left-img"></image>
							<view class="taskItemHead-left-title">{{ item.title }}</view>
						</view>
						<view class="taskItemHead-right">
							{{ item.time }}
						</view>
					</view>
					<view class="taskItemMiddle">{{ item.content }}</view>
					<u-divider></u-divider>
					<view class="taskItemBottom" @click="handleClickDetail">
						<view class="taskItemBottom-left">查看详情</view>
						<u-icon name="arrow-right" color="#333" size="18"></u-icon>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl: this.$ImgUrl,
				taskList: [
					{
						title: '任务提醒',
						content: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
						time: '2023-06-10 14:32:30'
					},
					{
						title: '任务提醒',
						content: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
						time: '2023-06-10 14:32:30'
					}
				]
			}
		},
		methods: {
			handleClickDetail() {
				uni.navigateTo({
					url: '/pages/TaskDetails/TaskDetails'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.pageView{
		width: 100%;
		height: 100vh;
		background: #F4F4F4;
		.taskItemHead{
			display: flex;
			justify-content: space-between;
			align-items: center;
			&-left{
				display: flex;
				align-items: center;
				&-img{
					width: 80rpx;
					height: 80rpx;
				}
				&-title{
					padding-left: 20rpx;
					font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
					font-weight: normal;
					font-size: 36rpx;
					color: #333333;
				}
			}
			&-right{
				font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
			}
		}
		.taskItemMiddle{
			font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
			font-weight: normal;
			font-size: 28rpx;
			color: #999999;
		}
		.taskItemBottom{
			display: flex;
			justify-content: space-between;
			align-items: center;
			&-left{
				font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
				font-weight: 400;
				font-size: 28rpx;
				color: #444444;
			}
		}
	}
</style>
